package com.dhf.mode;

import lombok.extern.slf4j.Slf4j;

/**
 * @ClassName PhoneFactory
 * @Description //TODO
 * @Author yangyuanping
 * @Date 2024/10/28 10:15
 **/
@Slf4j
public class PhoneFactory {
    public static Phone createPhone(String type) {
        if ("iphone".equals(type)) {
            return new IPhone();
        } else if ("MPhone".equals(type)) {
            return new MPhone();
        } else {
            log.info("请输入正确的手机类型");
            return null;
        }
    }
}
